<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>会员列表-WeAdmin Frame型后台管理系统-WeAdmin 1.0</title>
		<meta name="renderer" content="webkit" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<link rel="stylesheet" href="../static/css/font.css" />
		<link rel="stylesheet" href="../static/css/weadmin.css" />
	</head>

	<body>
		<div class="weadmin-nav">
			<span class="layui-breadcrumb" style="visibility: visible;">
				<a href="javascript:;">首页</a>
				<span lay-separator="">/</span>
				<a href="userList.html">会员管理</a>
				<span lay-separator="">/</span>
				<a href="userList.html">
					<cite>会员列表</cite>
				</a>
			</span>
			<a class="layui-btn layui-btn-sm" 
				style="margin-top:3px;float:right"
				href="javascript:location.replace(location.href);"
				title="刷新">
				<i class="layui-icon layui-icon-refresh"></i>
			</a>
		</div>

		<div class="weadmin-body" id="userList">
			<div class="layui-row">
				<form class="layui-form layui-col-md12 we-search">
					会员搜索：
					<div class="layui-inline">
						<input type="text" name="username" placeholder="请输入用户名" autocomplete="off" class="layui-input" />
					</div>
					<button class="layui-btn" type="button">
						<i class="layui-icon layui-icon-search"></i>
					</button>
				</form>
			</div>
			<div class="weadmin-block">
				<button class="layui-btn layui-btn-danger" onclick="delAll()">
					<i class="layui-icon layui-icon-delete"></i>批量操作
				</button>
				<span class="fr" style="line-height:40px">共有数据：88 条</span>
			</div>
			<table class="layui-table" id="memberList">
				<thead>
					<tr>
						<th>
							<input @click="selectAll()" class="layui-form-checkbox" lay-skin="primary" type="checkbox" />
						</th>
						<th>ID</th>
						<th>用户名</th>
						<th>性别</th>
						<th>手机</th>
						<th>邮箱</th>
						<th>地址</th>
						<th>加入时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr data-id="1" @click="check(1)">
						<td>
							<input v-model="ids" value="1" class="layui-form-checkbox" lay-skin="primary" type="checkbox" />
						</td>
						<td>1</td>
						<td>小张</td>
						<td>男</td>
						<td>17600000000</td>
						<td>admin@mail.com</td>
						<td>北京市 海淀区</td>
						<td>2017-01-01 11:11:42</td>
						<td class="td-status">
							<span class="layui-btn layui-btn-normal layui-btn-xs">已启用</span>
						</td>
						<td class="td-manage">
							<a onclick="member_stop(this,'10001')" href="javascript:;" title="启用">
								<i class="layui-icon layui-icon-download-circle"></i>
							</a>
							<a title="编辑" onclick="WeAdminEdit('编辑','./edit.html', 1, 600, 400)" href="javascript:;">
								<i class="layui-icon layui-icon-edit"></i>
							</a>
							<!-- <a onclick="WeAdminShow('修改密码','./password.html',600,400)" title="修改密码" href="javascript:;">
								<i class="layui-icon layui-icon-util"></i>
							</a>
							<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
								<i class="layui-icon layui-icon-delete"></i>
							</a> -->
						</td>
					</tr>
					<tr data-id="2" @click="check(2)">
						<td>
							<input v-model="ids" value="2" class="layui-form-checkbox" lay-skin="primary" type="checkbox" />
						</td>
						<td>2</td>
						<td>小明</td>
						<td>女</td>
						<td>13000000000</td>
						<td>admin@mail.com</td>
						<td>北京市 海淀区</td>
						<td>2017-01-01 11:11:42</td>
						<td class="td-status">
							<span class="layui-btn layui-btn-normal layui-btn-xs">已启用</span>
						</td>
						<td class="td-manage">
							<a onclick="member_stop(this,'10001')" href="javascript:;" title="启用">
								<i class="layui-icon layui-icon-download-circle"></i>
							</a>
							<a title="编辑" onclick="WeAdminEdit('编辑','./edit.html', 2, 600, 400)" href="javascript:;">
								<i class="layui-icon layui-icon-edit"></i>
							</a>
							<!-- <a onclick="WeAdminShow('修改密码','./password.html',600,400)" title="修改密码" href="javascript:;">
								<i class="layui-icon layui-icon-util"></i>
							</a>
							<a title="删除" onclick="member_del(this,'要删除的id')" href="javascript:;">
								<i class="layui-icon layui-icon-delete"></i>
							</a> -->
						</td>
					</tr>
				</tbody>
			</table>
			<div class="page">
				<div>
					<a class="prev" href="">&lt;&lt;</a> <a class="num" href="">1</a>
					<span class="current">2</span> <a class="num" href="">3</a>
					<a class="num" href="">489</a> <a class="next" href="">&gt;&gt;</a>
				</div>
			</div>
		</div>
		
		<!--<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>-->
		<script src="../lib/layui/layui.js" charset="utf-8"></script>
		<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
		
		<script type="text/javascript">
			var vm=new Vue({
				el:'#userList',
				data:{
					ids:[],
				},
				methods:{
					check:function(id){
						let n=this.ids.indexOf(id);
						if (n >= 0)
							this.ids.splice(n, 1);
						else
							this.ids.push(id);
						console.log(this.ids);
					},
					selectAll:function(){
						let list=[
							{id:1,name:'abc'},
							{id:2,name:'bcd'}
						];
						
						let id=[];
						if (this.ids.length==0){
							for(let i=0;i<list.length;i++){
								console.log(list[i].id);
								this.ids.push(list[i].id);
							}
						}else
							this.ids=[];
						
					}
					
				}
			})
		</script>
	</body>
</html>
